/*
 * @Author: hanxin 
 * @Date: 2021-08-30 15:13:30 
 * @Last Modified by: hanxin
 * @Last Modified time: 2021-08-30 16:25:38
 * emp表的业务层操作 对下层dao对象发送sql指令
 */
package mhl.service;

import mhl.dao.EmployeeDao;
import mhl.javabean.Employee;

public class empService {
    EmployeeDao employeeDao = new EmployeeDao();

    /**
     * 根据客户端输入的id与密码到服务器查询用户是否存在
     * @param empid
     * @param empPwd
     * @return
     */
    public Employee getEmpidAndPwd(String empid, String empPwd) {

        String sql = "select * from Employee where emp_id = ? and pwd = md5(?)";
        return employeeDao.query(sql, Employee.class, empid, empPwd);

    }
}
